---
layout: "default"
title: "LazyFilterIndex"
description: "Swift documentation for 'LazyFilterIndex': The Index used for subscripting a LazyFilterCollection."
keywords: "LazyFilterIndex,struct,swift,documentation,!=,<,<=,==,>,>=,base"
root: "/v3.0"
---

<div class="intro-declaration"><code class="language-swift">struct LazyFilterIndex&lt;Base : Collection&gt;</code></div>

<div class="discussion comment">
    <p>The <code>Index</code> used for subscripting a <code>LazyFilterCollection</code>.</p>

<p>The positions of a <code>LazyFilterIndex</code> correspond to those positions
<code>p</code> in its underlying collection <code>c</code> such that <code>c[p]</code>
satisfies the predicate with which the <code>LazyFilterIndex</code> was
initialized.</p>

<p><strong>Note:</strong> The performance of advancing a <code>LazyFilterIndex</code>
  depends on how sparsely the filtering predicate is satisfied,
  and may not offer the usual performance given by models of
  <code>Collection</code>.</p>
</div>

<table class="standard">
<tr>
<th id="inheritance">Inheritance</th>
<td>
<code class="inherits">Comparable, Equatable</code>
<span class="viz"><a href="hierarchy/">View Protocol Hierarchy &rarr;</a></span>
</td>
</tr>



<tr>
<th>Import</th>
<td><code class="language-swift">import Swift</code></td>
</tr>

</table>




<h3>Instance Variables</h3>
<div class="declaration" id="var-base_-base-index">
<a class="toggle-link" data-toggle="collapse" href="#comment-var-base_-base-index">var base: Base.Index</a><div class="comment collapse" id="comment-var-base_-base-index"><div class="p">
    <p>The position corresponding to <code>self</code> in the underlying collection.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">var base: Base.Index { get }</code>

    </div></div>
</div>



<h3>Instance Methods</h3>
<div class="declaration" id="func-excleq_rhs_">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-excleq_rhs_">func !=(<wbr>_:<wbr>rhs:)</a>
        
<div class="comment collapse" id="comment-func-excleq_rhs_"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func !=(lhs: LazyFilterIndex&lt;Base&gt;, rhs: LazyFilterIndex&lt;Base&gt;) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_rhs_">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_rhs_">func &lt;(<wbr>_:<wbr>rhs:)</a>
        
<div class="comment collapse" id="comment-func-lt_rhs_"><div class="p">
    <p>Returns a Boolean value indicating whether the value of the first
argument is less than that of the second argument.</p>

<p>This function is the only requirement of the <code>Comparable</code> protocol. The
remainder of the relational operator functions are implemented by the
standard library for any type that conforms to <code>Comparable</code>.</p>

<p><strong>Parameters:</strong>
  <strong>lhs:</strong> A value to compare.
  <strong>rhs:</strong> Another value to compare.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: LazyFilterIndex&lt;Base&gt;, rhs: LazyFilterIndex&lt;Base&gt;) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lteq_rhs_">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lteq_rhs_">func &lt;=(<wbr>_:<wbr>rhs:)</a>
        
<div class="comment collapse" id="comment-func-lteq_rhs_"><div class="p">
    <p>Returns a Boolean value indicating whether the value of the first
argument is less than or equal to that of the second argument.</p>

<p><strong>Parameters:</strong>
  <strong>lhs:</strong> A value to compare.
  <strong>rhs:</strong> Another value to compare.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;=(lhs: LazyFilterIndex&lt;Base&gt;, rhs: LazyFilterIndex&lt;Base&gt;) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-eqeq_rhs_">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-eqeq_rhs_">func ==(<wbr>_:<wbr>rhs:)</a>
        
<div class="comment collapse" id="comment-func-eqeq_rhs_"><div class="p">
    <p>Returns a Boolean value indicating whether two values are equal.</p>

<p>Equality is the inverse of inequality. For any values <code>a</code> and <code>b</code>,
<code>a == b</code> implies that <code>a != b</code> is <code>false</code>.</p>

<p><strong>Parameters:</strong>
  <strong>lhs:</strong> A value to compare.
  <strong>rhs:</strong> Another value to compare.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func ==(lhs: LazyFilterIndex&lt;Base&gt;, rhs: LazyFilterIndex&lt;Base&gt;) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-gt_rhs_">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-gt_rhs_">func &gt;(<wbr>_:<wbr>rhs:)</a>
        
<div class="comment collapse" id="comment-func-gt_rhs_"><div class="p">
    <p>Returns a Boolean value indicating whether the value of the first
argument is greater than that of the second argument.</p>

<p><strong>Parameters:</strong>
  <strong>lhs:</strong> A value to compare.
  <strong>rhs:</strong> Another value to compare.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func &gt;(lhs: LazyFilterIndex&lt;Base&gt;, rhs: LazyFilterIndex&lt;Base&gt;) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-gteq_rhs_">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-gteq_rhs_">func &gt;=(<wbr>_:<wbr>rhs:)</a>
        
<div class="comment collapse" id="comment-func-gteq_rhs_"><div class="p">
    <p>Returns a Boolean value indicating whether the value of the first
argument is greater than or equal to that of the second argument.</p>

<p><strong>Parameters:</strong>
  <strong>lhs:</strong> A value to compare.
  <strong>rhs:</strong> Another value to compare.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func &gt;=(lhs: LazyFilterIndex&lt;Base&gt;, rhs: LazyFilterIndex&lt;Base&gt;) -&gt; Bool</code>
    
    
</div></div>
</div>


